Skip to content

[build-tools] Auto-upload embedded bundle after build when opt-in flag is set#3767

Merged
gwdp merged 9 commits into
mainfrom
gwdp/embedded-update-auto-upload
May 29, 2026
Merged

[build-tools] Auto-upload embedded bundle after build when opt-in flag is set#3767
gwdp merged 9 commits into
mainfrom
gwdp/embedded-update-auto-upload

Conversation

@gwdp
Copy link
Copy Markdown
Contributor

@gwdp gwdp commented May 20, 2026

Why

After a native build completes, the JS bundle embedded in the artifact isn't registered with EAS Update, so the diff worker has no base to patch against — the first OTA after install always downloads the full bundle. This phase registers it automatically so patch-based updates work from day one.

Ref ENG-21033

How

  • New uploadEmbeddedBundleAsync in packages/build-tools/src/utils/expoUpdatesEmbedded.ts
  • After UPLOAD_APPLICATION_ARCHIVE, both iOS and Android builders check EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE and isEASUpdateConfigured before entering the new UPLOAD_EMBEDDED_BUNDLE phase
  • Opens the build artifact (IPA / APK / AAB) with StreamZip, extracts main.jsbundle + app.manifest (iOS) or index.android.bundle + assets/app.manifest (Android) to a temp dir, then calls eas update:embedded:upload
  • Failures are non-fatal: logged as warnings so the build result is unaffected

Test Plan

  • yarn tsc --noEmit && yarn lint && yarn fmt:check pass on packages/eas-cli and packages/build-tools

@linear
Copy link
Copy Markdown

linear Bot commented May 20, 2026

ENG-21033

gwdp added a commit that referenced this pull request May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.46%. Comparing base (7bdc009) to head (73d1cf6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3767      +/-   ##
==========================================
+ Coverage   57.39%   57.46%   +0.07%     
==========================================
  Files         909      911       +2     
  Lines       39386    39480      +94     
  Branches     8247     8271      +24     
==========================================
+ Hits        22603    22684      +81     
- Misses      15316    15328      +12     
- Partials     1467     1468       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp gwdp changed the title [build-tools] Auto-upload embedded bundle after build when EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE is set [build-tools] Auto-upload embedded bundle after build when opt-in flag is set May 21, 2026
Copy link
Copy Markdown
Contributor Author

gwdp commented May 21, 2026

@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch 2 times, most recently from 4e508df to af16ad4 Compare May 21, 2026 00:46
@gwdp gwdp requested a review from quinlanj May 21, 2026 00:48
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch 3 times, most recently from 748a8d5 to a4deecb Compare May 21, 2026 22:02
@gwdp gwdp force-pushed the gwdp/embedded-update-upload-cmd-skeleton branch from 21ad729 to b9050ec Compare May 22, 2026 22:14
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch 2 times, most recently from 88e62c9 to 28b876a Compare May 22, 2026 22:22
@gwdp gwdp marked this pull request as ready for review May 22, 2026 22:36
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch 2 times, most recently from ec359ca to 232b28f Compare May 26, 2026 19:39
@gwdp gwdp force-pushed the gwdp/embedded-update-upload-cmd-skeleton branch from 58d7c3d to 77d7e75 Compare May 26, 2026 19:42
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from 232b28f to 1ed4af0 Compare May 26, 2026 19:42
@gwdp gwdp force-pushed the gwdp/embedded-update-upload-cmd-skeleton branch from 77d7e75 to ceb95b6 Compare May 27, 2026 17:52
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from 1ed4af0 to acf7b1f Compare May 27, 2026 17:52
Base automatically changed from gwdp/embedded-update-upload-cmd-skeleton to main May 28, 2026 16:35
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from acf7b1f to 22e0d04 Compare May 28, 2026 16:45
@gwdp gwdp requested a review from sjchmiela May 28, 2026 20:47
Copy link
Copy Markdown
Member

@quinlanj quinlanj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, lets run it by staszek first in case there's anything we've missed!

Comment thread packages/build-tools/src/utils/expoUpdatesEmbedded.ts Outdated
Comment thread packages/build-tools/src/utils/expoUpdatesEmbedded.ts Outdated
Comment thread packages/build-tools/src/utils/expoUpdatesEmbedded.ts Outdated
@gwdp gwdp force-pushed the gwdp/embedded-update-auto-upload branch from 22e0d04 to 73d1cf6 Compare May 29, 2026 16:54
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@gwdp gwdp merged commit 2c1837f into main May 29, 2026
11 checks passed
@gwdp gwdp deleted the gwdp/embedded-update-auto-upload branch May 29, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants